<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jstl/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:v="http://converge.i2m.dk"
      xmlns:converge="http://com.interactivemediamanagement.converge/tags">
    <ui:composition template="/WEB-INF/facelets/templates/default.xhtml">

        <ui:define name="title">
            <h:outputText value="#{msgs.PLANNING}" />
        </ui:define>

        <ui:define name="pageBody">
            <div id="layout2">
                <div id="leftColumn">
                    <ui:insert name="leftColumnTop" />

                    <h:form id="frmAssignmentStyle" rendered="#{userSession.privileged['OUTLET_PLANNING']}">
                        <converge:moduleHeader moduleTitle="#{msgs.planning_ASSIGNMENT_MANAGE}" />
                        <div class="moduleContent">
                            <h:panelGrid columns="2">
                                <h:graphicImage value="#{res.BULLET_ICON}" alt="#{msgs.planning_ASSIGNMENT_MANAGE_DIARY}" title="#{msgs.planning_ASSIGNMENT_MANAGE_DIARY}" />
                                <h:commandLink action="/planning/assignments">
                                    <h:outputText value="#{msgs.planning_ASSIGNMENT_MANAGE_DIARY}" />
                                </h:commandLink>

                                <h:graphicImage value="#{res.BULLET_ICON}" alt="#{msgs.planning_ASSIGNMENT_MANAGE_EDITIONS}" title="#{msgs.planning_ASSIGNMENT_MANAGE_EDITIONS}" />
                                <h:commandLink action="/planning/editions">
                                    <h:outputText value="#{msgs.planning_ASSIGNMENT_MANAGE_EDITIONS}" />
                                </h:commandLink>

                                <h:graphicImage value="#{res.BULLET_ICON}" alt="#{msgs.planning_ASSIGNMENT_MANAGE_PIPELINE}" title="#{msgs.planning_ASSIGNMENT_MANAGE_PIPELINE}" />
                                <h:commandLink action="/planning/pipeline">
                                    <h:outputText value="#{msgs.planning_ASSIGNMENT_MANAGE_PIPELINE}" />
                                </h:commandLink>
                            </h:panelGrid>
                        </div>
                    </h:form>
                    <div style="clear: both; padding-bottom: 12px;"></div>

                    <h:form id="frmOutlets" rendered="#{userSession.privileged['OUTLET_PLANNING']}">
                        <converge:moduleHeader moduleTitle="#{msgs.OUTLETS}" />
                        <div class="moduleContent">
                            <h:dataTable value="#{planning.outlets}" var="outlet">
                                <h:column>
                                    <h:graphicImage value="#{res.BULLET_ICON}"
                                                    alt="#{outlet.title}"
                                                    title="#{outlet.title}" />
                                </h:column>
                                <h:column>
                                    <a4j:commandLink reRender="frmPage">
                                        <f:setPropertyActionListener value="#{outlet}" target="#{planning.selectedOutlet}" />
                                        <h:outputText value="#{outlet.title}" />
                                    </a4j:commandLink>
                                </h:column>
                            </h:dataTable>
                        </div>
                    </h:form>
                    <div style="clear: both; padding-bottom: 12px;"></div>

                    <ui:insert name="leftColumnBottom" />
                </div>
                <div id="rightColumn">
                    <ui:insert name="body" />
                </div>
            </div>
        </ui:define>
    </ui:composition>
</html>